package JC.dyjd;

import java.util.ArrayList;
import java.util.Arrays;

/*本类用于练习List类型*/
public class jihe_list {
    public static void main(String[] args) {
        ArrayList<String> it = new ArrayList<>();
        it.add("白龙马");
        it.add("孙悟空");
        it.add("猪八戒");
        it.add("唐三藏");
        System.out.println(it);
        System.out.println(it.remove("猪八戒"));
        System.out.println(it);
        System.out.println(it.indexOf("白龙马"));
        System.out.println(it.lastIndexOf("猪八戒"));
    }
}
